package org.xcorpio.java8.chapter06;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

import org.xcorpio.java8.common.Data;

public class CollectionInterface {

    public static void main(String[] args) {
        System.out.println(Data.Menu.stream().collect(new ToListCollector<>()));
        System.out.println(Data.Menu.stream().collect(Collectors.toList()));
        System.out.println(Data.Menu.stream().collect(ArrayList::new, List::add, List::addAll));
    }
}
